﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserNestedMasterPage.master" AutoEventWireup="true" CodeBehind="EducationWebForm.aspx.cs" Inherits="JobbJaktWeb.EducationWebForm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ListView ID="ListViewEducation" runat="server" DataKeyNames="EducationID" OnItemCanceling="CancelEditEducation"
        OnItemInserting="InsertEducation" InsertItemPosition ="LastItem" OnItemDeleting="DeleteEducation" OnItemEditing="EditEducation">
      
        <ItemTemplate>
              Utbildning namn:    <asp:Label ID="LabelName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
    <br/>
   Start datum: <asp:Label ID="LabelEducationStart" runat="server" Text='<%# Eval("StartDate") %>'></asp:Label> &nbsp;&nbsp;&nbsp;Slut datum:<asp:Label ID="LabelEductionEndDate" runat="server" Text='<%# Eval("EndDate") %>'></asp:Label>
    <br/>
   Utbildning nivå: <asp:Label ID="LabelEducationLevel" runat="server" Text='<%# Eval("EducationLevel") %>'></asp:Label>
    <br/>
  
Examen: <asp:Label ID="LabelExamination" runat="server" Text='<%# Eval("Examination") %>'></asp:Label>
        
            <br/>
            <asp:Button ID="ButtonEdit" runat="server" Text="Redigera" CommandName="Edit"/>&nbsp;&nbsp;&nbsp;<asp:Button ID="ButtonDelete" runat="server" Text="Ta bort" CommandName="Delete" />
       <br/>
       <br/>
             </ItemTemplate>
        <EditItemTemplate>
             <table style="width: 100%">
        
        <tr>
            <td>Utbildning namn:</td>
            <td colspan="3">
                <asp:TextBox   ID="TextBoxEducationName" runat="server" Text='<%# Eval("Name") %>'></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="height: 21px">Start datum</td>
            <td style="height: 21px">
                <asp:TextBox ID="TextBoxEducationStartDate" runat="server" Text='<%# Eval("StartDate") %>'></asp:TextBox>
            </td>
            <td style="height: 21px">
                Slut datum:</td>
            <td style="height: 21px">
                <asp:TextBox ID="TextBoxEndEducationDate" runat="server" Text='<%# Eval("EndDate") %>'></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Utbildning Nivå:</td>
            <td colspan="3">
                <asp:ListBox ID="ListBoxEducationLevel" runat="server" DataTextField='<%# Eval("EducationLevel") %>' >
                   <asp:ListItem Text="Grundskola" Value="0" />
                      <asp:ListItem Text="Gymnasium" Value="1" />
                    <asp:ListItem Text="Yrkeshögskola" Value="2" />
                    <asp:ListItem Text="Högskola" Value="3" /> 
                    <asp:ListItem Text="Universitet" Value="4" /> 
                   
           
                </asp:ListBox>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td colspan="3">
                  <br/>
         Examen:
            <asp:DropDownList ID="DropDownListExamination" runat="server" SelectedValue='<%# Eval("Examination") %>'>
                <asp:ListItem Text="Ja" Value="True" />

              <asp:ListItem Text="Nej" Value="False" />
            </asp:DropDownList>

            </td>
        </tr>
    </table> 
            <br/>
              
            <asp:Button ID="ButtonUpdate" runat="server" Text="Updatera" CommandName="Update"/>&nbsp;&nbsp;&nbsp; <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" CommandName="Cancel"/>
            <br/>
           

        </EditItemTemplate>
        <InsertItemTemplate>
                 <table style="width: 100%">
        
        <tr>
            <td>Utbildning namn:</td>
            <td colspan="3">
                <asp:TextBox   ID="TextBoxEducationName" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="height: 21px">Start datum:</td>
            <td style="height: 21px">
                <asp:TextBox ID="TextBoxEducationStartDate" runat="server" ></asp:TextBox>
            </td>
            <td style="height: 21px">
                Slut datum:</td>
            <td style="height: 21px">
                <asp:TextBox ID="TextBoxEndEducationDate" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Utbilning nivå:</td>
            <td colspan="3">
                <asp:ListBox ID="ListBoxEducationLevel" runat="server"  >
                   <asp:ListItem Text="Grundskola" Value="0" />
                      <asp:ListItem Text="Gymnasium" Value="1" />
                    <asp:ListItem Text="Yrkeshögskola" Value="2" />
                    <asp:ListItem Text="Högskola" Value="3" /> 
                    <asp:ListItem Text="Universitet" Value="4" /> 
                   
           
                </asp:ListBox>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td colspan="3">
                  <br/>
         Examen:
            <asp:DropDownList ID="DropDownListExamination" runat="server" >
                <asp:ListItem Text="Ja" Value="True" />

              <asp:ListItem Text="Nej" Value="False" />
            </asp:DropDownList>

            </td>
        </tr>
    </table> 
            <br/>
             
               <asp:Button ID="ButtonInsert" runat="server" Text="Lägg till" CommandName="Insert"/>  
       <asp:PlaceHolder ID="itemPlaceHolderEducation" runat="server"></asp:PlaceHolder>
        </InsertItemTemplate>
        
    </asp:ListView>
 
    
    
    
     
    
</asp:Content>
